/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.charlie.sessions;

import com.charlie.beans.Users;
import java.util.List;
import javax.ejb.Local;

/**
 *
 * @author Вова
 */
@Local
public interface UsersFacadeLocal {

    void create(Users users);

    void edit(Users users);

    void remove(Users users);

    Users find(Object id);

    List<Users> findAll();

    List<Users> findRange(int[] range);
    public Users findByEmail(String email);
    
    public Users findByUsersId(Integer usersId);
    
    public Users findByEmailAndPassword(String email, String password);
    
    public List<Users> findByFirstName(String firstName);
    
    public List<Users> findBySecondName(String firstName);
    
    public List<Users> findByLocation(String location);
    
    public List<Users> findByCreationDate(String creationDate);
    
    public List<Users> findByStatus(String status);

    int count();

    boolean emailIsValid(String email);
    
    boolean nameIsValid(String name);
    
}
